#include "led.h"
#include "key.h"
#include "delay.h"
#include "usart.h"

int main(void)
{
    uint8_t buffer[100] = {0};
    uint8_t size = 0;

    // 初始化
    USART_Init();

    // 发送单个字符
    USART_SendChar('a');
    USART_SendChar('t');
    USART_SendChar('\n');

    while(1)
    {
//        USART_SendChar('x');
//        USART_SendChar('\n');
//        Delay_s(1);
//        uint8_t ch = USART_ReceiveChar();
//        USART_SendChar(ch);
        USART_ReceiveString(buffer, &size);
        USART_SendString(buffer, size);
    }
}
